package com.atguigu;

import com.atguigu.excel.User;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class test {
   @Test
   public void test01(){
      User user=new User();
//      user=null;
      System.out.println(user.getName());
   }
   @Test
   public void test02(){
      List<User> users=new ArrayList<>(6);
      User user=new User();
      user.setId(1);
      user.setName("八嘎");
//      users.add(user);
      System.out.println(users.size());
   }
   @Test
   public void test03(){
      List<Integer> sss=new ArrayList<>();
      sss.add(1);sss.add(2);sss.add(3);sss.add(33);sss.add(333);sss.add(3333);
      Map<Integer,String> ttt=new HashMap<>();
      sss.stream().map(ss -> {
         ttt.put(ss, "j九四u");
         return null;
      });
      System.out.println(ttt);
   }
   @Test
   public void test04(){
      String s="http://relkv4kh8.hb-bkt.clouddn.com/ggkt_classroom/6437eedeea6c4f68a6ca06cf98ed7d02";
      String s1="http://relkv4kh8.hb-bkt.clouddn.com/ggkt_classroom/15d9a28dbcc44342bbd7985b1224fc6c";
      List<String> urls=new ArrayList<>();
      urls.add(s);urls.add(s1);
      urls.add("3b71d85d93554e7dbb59becdf823f63d");
      List<String> fileKeys=urls.stream().map(url->{
         String[] keys = url.split("http://relkv4kh8.hb-bkt.clouddn.com/");
         return keys[keys.length-1];
      }).collect(Collectors.toList());
      System.out.println(fileKeys);
   }
}
